from src.baseapp.model import create_tables
from flask_cors import CORS
from src.baseapp.view import *

CORS(app, resources={
    r"/*": {
        "origins": ["http://localhost:8080"],
        "methods": ["GET", "POST", "PUT", "DELETE", "OPTIONS"],
        "allow_headers": ["Content-Type", "Authorization", "Token", "Trace-Id", "Context-Type"],
        "supports_credentials": True
    }
})

if __name__ == '__main__':
    create_tables()
    app.run(port=8000, debug=True)
